﻿#region 版权信息
// ------------------------------------------------------------------------------
// Copyright: (c) 2029  成都A+有限公司 - Amm
// 项目名称：Amm.Common
// 文件名称：PageInput.cs
// 创建时间：2020101014:06
// 更改时间：2020101014:06
//  ------------------------------------------------------------------------------
#endregion

namespace Colorful.Furniture.CommonDto
{
    /// <summary>
    ///  分页请求体
    /// </summary>
    public class PageInputDto
    {
        /// <summary>
        ///  分页条数
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        ///  当前页码
        /// </summary>
        public int PageIndex { get; set; }
    }

    /// <summary>
    ///  分页请求体
    /// </summary>
    /// <typeparam name="TFilter">筛选条件</typeparam>
    public class PageInputDto<TFilter> where TFilter : class, new()
    {
        /// <summary>
        ///  筛选
        /// </summary>
        public TFilter Filter { get; set; }
    }

    /// <summary>
    ///  分页请求体
    /// </summary>
    /// <typeparam name="TFilter">筛选条件</typeparam>
    /// <typeparam name="TSort">排序</typeparam>
    public class PageInputBaseDto<TFilter, TSort>
        where TFilter : class, new()
        where TSort : class, new()
    {
        /// <summary>
        ///  排序
        /// </summary>
        public TFilter Filter { get; set; }

        /// <summary>
        ///  筛选
        /// </summary>
        public TSort Sort { get; set; }
    }
}